#include <iostream>

using namespace std;

void func (const int&) {
}

void gunc (int&) {
}

int main () {
	int y = 100;
	int &x = y;
	func (x);
	gunc (200);
	return 0;
};

/*
 *	output
 *
 [sgupta@rhel6x86 reference]$ c++ -o const_reference const_reference.cpp 
const_reference.cpp: In function ‘int main()’:
const_reference.cpp:15: error: invalid initialization of non-const reference of type ‘int&’ from a temporary of type ‘int’
const_reference.cpp:8: error: in passing argument 1 of ‘void gunc(int&)’
[sgupta@rhel6x86 reference]$ 
 */
